Skip to content

[NO QA][Wise] Add the next step for a payment our payments partner is reviewing - #107084

Merged
grgia merged 8 commits into
Expensify:mainfrom
KioCoan:wisePaymentReviewNextStep
Nov 23, 2026
Merged

grgia merged 8 commits into
Expensify:mainfrom
KioCoan:wisePaymentReviewNextStep

Conversation

@KioCoan

@KioCoan KioCoan commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

  • Adds the next step key waitingForPaymentReview, which Auth sends while our payments partner (Wise) reviews a paid report's payment: "Payment on hold, look for another update." There's no date, because Wise's delivery estimate doesn't hold during the review.
  • In UPCOMING_STEP_ACTION_BY_MESSAGE_KEY the key maps to PAY, the same as waitingForPayment, not undefined. Nobody on the report can act on it, but the same is true of waitingForPayment, and the new key replaces that one on the same paid report. So the report history stays the same when a hold starts or ends. Auth sends a paid report no upcoming steps, so the mapping only matters for an older snapshot: PAY trims it to the pay step, while undefined would still list submit and approve as coming up.
  • Spanish is written by hand. The other locales come from scripts/generateTranslations.ts, keeping only the new key's line. A full run rewrote the rest of the nextStep block, so I kept the reviewed strings.

Fixed Issues

https://github.com/Expensify/Expensify/issues/703529

Tests

  1. Run npx jest tests/unit/NextStepUtilsTest.ts. Confirm "says a payment is on hold without a delivery date" passes. It fails on main, where the message is empty.
  2. With https://github.com/Expensify/Auth/pull/26779 on the dev VM, open a paid report whose Wise payment is still in progress. Confirm the header reads "Waiting for payment to complete by {date}".
  3. Put that payment on hold (on dev, write ["deposit_amount_less_invoice"] to the reimbursement's details.hold.activeCases), then reopen the report.
  4. Confirm the header reads "Payment on hold, look for another update." with no date.
  5. Clear the cases ([]), reopen the report, and confirm it reads "Waiting for payment to complete by {date}" again.
  • Verify that no errors appear in the JS console

Offline tests

  1. Open a report whose header reads "Payment on hold, look for another update."
  2. Go offline and reopen the report.
  3. Confirm the header still shows the same message, since the next step comes from the last server response.

QA Steps

  1. On staging, pay a report through a Wise bank account and open it.
  2. Confirm the header reads "Waiting for payment to complete by {date}".
  3. If Wise puts the payment on hold (the report gets a "put the payment on hold" message), confirm the header reads "Payment on hold, look for another update." with no date.
  4. When the report gets the release message, confirm the header goes back to "Waiting for payment to complete by {date}".
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Before, on main Auth with the payment on hold: newdot-1-before-held-payment-on-main-auth
On hold, with this PR and the Auth PR: <image
After the cases clear: newdot-3-released-on-branch

@KioCoan KioCoan changed the title Wise] Add the next step for a payment our payments partner is reviewing [Wise] Add the next step for a payment our payments partner is reviewing Nov 17, 2026
@expensify-chore-bot

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@KioCoan
KioCoan requested a review from grgia November 17, 2026 18:22
@KioCoan
KioCoan marked this pull request as ready for review November 17, 2026 18:22
@KioCoan
KioCoan requested review from a team as code owners November 17, 2026 18:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T18:38:38.597862Z 0821da2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@expensify-chore-bot
expensify-chore-bot Bot requested review from stitesExpensify and removed request for a team November 17, 2026 18:22
@expensify-chore-bot

Copy link
Copy Markdown

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@heyjennahay
heyjennahay requested review from joekaufmanexpensify and removed request for heyjennahay November 17, 2026 19:52
@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

NAB: Is there a reason not to just use the copy for the next step from the design doc that is shorter? I feel like the copy that's in the next step right now will more frequently wrap to multiple lines on smaller screens, which doesn't look as good, IMO.

image

@KioCoan

KioCoan commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

NAB: Is there a reason not to just use the copy for the next step from the design doc that is shorter? I feel like the copy that's in the next step right now will more frequently wrap to multiple lines on smaller screens, which doesn't look as good, IMO.
image

Oh, no real reason. I missed it. haha.
Thanks for bringing this up, I'll adapt the changes for both.

Comment thread Mobile-Expensify

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KioCoan I think this was accidentally commited

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Yeah. Let me remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

danieldoglas
danieldoglas previously approved these changes Nov 18, 2026
@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Also, investigating with Codex, it seems to think that the report comment we add after a payment is released mentions the potential for an FX rate to change the amount. Is that right? (I don't think I can easily simulate this case on an adhoc build to test myself).

If so, I think we might be mixing up cases here. My understanding is this PR is covering the case where Wise holds a payment (covered in the design doc here.) If so, there is no potential FX rate change for that case. We've already created the payment with Wise, and the rate is locked. When the payment is released, we would only need to explain that it was released and provide an updated estimate for when the funds would be delivered. See below for the screenshot from the design doc.

This differs from a different case in the design doc where Expensify puts a payment on hold for our internal review. That case happens before the payment is created with Wise, meaning that there is the potential for the final FX rate to change depending on how long the internal review takes. That case has not yet been approved by Wise and is still subject to further internal discussion. I don't think we should handle that in this PR yet.

Please let me know if there are any questions on that. Thank you!

image

@KioCoan

KioCoan commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Also, investigating with Codex, it seems to think that the report comment we add after a payment is released mentions the potential for an FX rate to change the amount. Is that right? (I don't think I can easily simulate this case on an adhoc build to test myself).

If so, I think we might be mixing up cases here. My understanding is this PR is covering the case where Wise holds a payment (covered in the design doc here.) If so, there is no potential FX rate change for that case. We've already created the payment with Wise, and the rate is locked. When the payment is released, we would only need to explain that it was released and provide an updated estimate for when the funds would be delivered. See below for the screenshot from the design doc.

This differs from a different case in the design doc where Expensify puts a payment on hold for our internal review. That case happens before the payment is created with Wise, meaning that there is the potential for the final FX rate to change depending on how long the internal review takes. That case has not yet been approved by Wise and is still subject to further internal discussion. I don't think we should handle that in this PR yet.

Please let me know if there are any questions on that. Thank you!
image

Yeah, Codex is right. The release comment reads "The review is complete and your payment is on its way. The final FX rate may change the amount."

That copy isn't from this PR though, this one only adds the next step. It came in with App PR 106161, from the copy table in this 692516 comment.

I agree with you. Wise holds the payment after we've created the transfer, so the rate is already locked and there's nothing to warn about.

Should I adjust it in this PR? I think we also need to update the Auth portion to fully match the mock. I could do it in two follow up PRs:

  • App: change the copy to "Payment released, funds are expected to arrive by {date}." and drop the FX line from every locale. Without a date it would read "Payment released." Does that work for you?
  • Auth: read the estimate when the hold clears, save it on the report and send it as expectedDate on the release action. That also moves the "Waiting for payment to complete by {date}" next step to the new date.

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Thank you for the explanation. Yep, let's change that. Thanks!

grgia
grgia previously approved these changes Nov 19, 2026
@grgia

grgia commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@KioCoan are you going to push that fix?

@KioCoan

KioCoan commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@KioCoan are you going to push that fix?

Yeah, working on it. I'll ping you in a bit.

@KioCoan
KioCoan dismissed stale reviews from grgia and danieldoglas via 33f66ad November 19, 2026 16:22
@KioCoan

KioCoan commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@grgia pushed. The release message now reads "Payment released, funds are expected to arrive by {date}.", or "Payment released." without a date, and the FX line is gone from every locale. Auth doesn't send the date on the release yet, so I'll add that in a follow-up.

Do we need to add any specific QA labels or instructions for Wise PRs?

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 96.18% <ø> (+0.02%) ⬆️
src/libs/NextStepUtils.ts 82.42% <100.00%> (+0.67%) ⬆️
src/libs/ReportActionsUtils.ts 86.83% <25.00%> (+0.12%) ⬆️
... and 740 files with indirect coverage changes

@grgia

grgia commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Auth doesn't send the date on the release yet, so I'll add that in a follow-up.

@KioCoan should we hold this on that auth change instead?

@KioCoan

KioCoan commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Auth doesn't send the date on the release yet, so I'll add that in a follow-up.

@KioCoan should we hold this on that auth change instead?

I made it optional, so we can do this one first. The Auth draft is up but it's stacked on https://github.com/Expensify/Auth/pull/26779

@grgia

grgia commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@KioCoan i merged that one, are we good to merge this? This pr LGTM

@KioCoan

KioCoan commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@KioCoan i merged that one, are we good to merge this? This pr LGTM

@grgia yep.

@grgia

grgia commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@grgia
grgia merged commit d8594d9 into Expensify:main Nov 23, 2026
38 of 45 checks passed
@KioCoan
KioCoan deleted the wisePaymentReviewNextStep branch November 23, 2026 15:23
@github-actions

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.5.53-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — this PR only clarifies existing payment hold and release messages, without adding a user workflow or making any existing article sentence incorrect.


view run

@m-natarajan

Copy link
Copy Markdown

@KioCoan Can you please share credentials to connect to Wise bank or random details works for this?

@KioCoan

KioCoan commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@grgia could you help us with QA? I don't know the process used for the other PRs.

@grgia

grgia commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@KioCoan no QA needed for this App PR

@grgia grgia changed the title [Wise] Add the next step for a payment our payments partner is reviewing [NO QA][Wise] Add the next step for a payment our payments partner is reviewing Nov 24, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/arosiclair in version: 9.5.53-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants